import modalComp from './modal.vue';

export default {
    install(Vue) {
        const ModalConstructor = Vue.extend(modalComp);
        const modal = new ModalConstructor();

        modal.$mount(document.createElement('div'));

        document.body.appendChild(modal.$el);

        Vue.prototype.$showModal = modal.showModal;
        Vue.component('Modal', modal);
    },
};
